package beer.zivelin.awesome.walawala.mobile.entity;

import android.app.Activity;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.drawable.Drawable;

import com.github.houbb.heaven.util.lang.StringUtil;
import com.google.common.base.Objects;

public class ApplicationData {
    private String packageName;
    private String name;
    private Drawable icon;
    private String t9Pinyin;

    public String getPackageName() {
        return packageName;
    }

    public void setPackageName(String packageName) {
        this.packageName = packageName;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Drawable getIcon() {
        return icon;
    }

    public void setIcon(Drawable icon) {
        this.icon = icon;
    }

    public String getIconName() {
        return packageName + ".png";
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ApplicationData data = (ApplicationData) o;
        return Objects.equal(packageName, data.packageName) && Objects.equal(name, data.name);
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(packageName, name);
    }
}
